﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using InfFront.InfoViews.Base;

namespace InfFront.InfoViews.WinForms
{
    public static class Imaging
    {
        public static Image GetIcon(this IIconedObject source, int hSize, int vSize, bool disabled, bool highlighted)
        {
            var stream = source.GetIconStreamPng(hSize, vSize, disabled, highlighted);
            if (stream == null)
                return null;
            var result = new Bitmap(stream);
            return result;
        }
    }
}
